home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk155 / zkick / zkick.i < prev   
Text File  |  1995-03-19  |  2KB  |  97 lines

  1. *************************************************************************
  2. *
  3. *    Copyright (C) 1985, Commodore Amiga Inc.  All rights reserved.
  4. *    Permission granted for non-commercial use
  5. *
  6. * asmsupp.i -- random low level assembly support routines
  7. *
  8. *************************************************************************
  9.  
  10. CLEAR    MACRO        ;quick way to clear a D register on 68000
  11.     MOVEQ    #0,\1
  12.     ENDM
  13.  
  14. ;BHS     MACRO
  15. ;     BCC.\0  \1 ;\0 is the extension used on the macro (such as ".s")
  16. ;     ENDM
  17. ;BLO     MACRO
  18. ;     BCS.\0  \1
  19. ;     ENDM
  20.  
  21. EVEN    MACRO        ; word align code stream
  22.     DS.W    0
  23.     ENDM
  24.  
  25. LINKSYS MACRO        ; link to a library without having to see a _LVO
  26.     MOVE.L    A6,-(SP)
  27.     MOVE.L    \2,A6
  28.     JSR    _LVO\1(A6)
  29.     MOVE.L    (SP)+,A6
  30.     ENDM
  31.  
  32. CALLSYS MACRO        ; call a library via A6 without having to see _LVO
  33.     JSR    _LVO\1(A6)
  34.     ENDM
  35.  
  36. XLIB    MACRO        ; define a library reference without the _LVO
  37.     XREF    _LVO\1
  38.     ENDM
  39. ;
  40. ; Put a message to the serial port at 9600 baud.  Used as so:
  41. ;
  42. ;     PUTMSG   <'Init: called'>
  43. ;
  44.         XREF    DPutStr
  45.  
  46. PUTMSG:     MACRO    * level,msg
  47.  
  48.     IFD DEBUG
  49.         MOVEM.L A0-A1/D0-D1,-(SP)
  50.         LEA    msg\@,A0    ;Point to static format string
  51.         JSR    DPutStr
  52.         MOVEM.L (SP)+,A0-A1/D0-D1
  53.         BRA.S    end\@
  54.  
  55. msg\@        DC.B    \1
  56.         DC.B    10
  57.         DC.B    0
  58.         DS.W    0
  59. end\@
  60.  
  61.     ENDC
  62.         ENDM
  63.  
  64. ;
  65. ; Put a message to the serial port at 9600 baud.  Used as so:
  66. ;
  67. ;     NS_PUTMSG   <'Init: called'>
  68. ;
  69. ;    Uses NO stack, but trashes a0,a1,d0,d1
  70. ;
  71.         XREF    DPutStr
  72.  
  73. NS_PUTMSG:     MACRO    * level,msg
  74.  
  75.     IFD DEBUG
  76.         LEA    msg\@,A0    ;Point to static format string
  77.  
  78. a1\@:        MOVE.B    (A0)+,D0
  79.         BEQ.S    end\@
  80. a3\@:    MOVE.B    $BFD000,D1
  81.         BTST        #0,D1
  82.         BNE.S    a3\@
  83.         MOVE.B    #$FF,$BFE301
  84.         MOVE.B    D0,$BFE101
  85.  
  86.         BRA.S    a1\@
  87.  
  88. msg\@:    DC.B    \1
  89.         DC.B    10
  90.         DC.B    0
  91.         DS.W    0
  92. end\@:
  93.  
  94.     ENDC
  95.         ENDM
  96.  
  97.